package com.jilefojing.beans.pojos.enhanced;

import java.util.Date;
import java.util.List;

import com.jilefojing.beans.enums.ProgressStatusForSource;
import com.jilefojing.beans.enums.StatusEnumForPublish;
import com.jilefojing.beans.pojos.EVideo;
import com.jilefojing.beans.pojos.enhanced.base.BaseEnhanced;
import com.jilefojing.beans.vo.PlayTypeForEVideo;

public class EnhancedEVideo extends BaseEnhanced {
	public EnhancedEVideo(EVideo eVideo) {
		if (eVideo.getId() != null) {
			this.id = eVideo.getId();
		}
		this.title = eVideo.getTitle();
		this.skey = eVideo.getSkey();
		this.sources = eVideo.getSources();

		this.createTime = eVideo.getCreateTime();
		this.updateTime = eVideo.getUpdateTime();
		this.coverUrl = eVideo.getCoverUrl();
		if (eVideo.getCreateUser() != null) {
			EnhancedUser _EnhancedCreateUser = new EnhancedUser();
			_EnhancedCreateUser.setId(eVideo.getCreateUser());
			this.enhancedCreateUser = _EnhancedCreateUser;
		}
		if (eVideo.getEntity() != null) {
			if (eVideo.getEntity() == 1) {
				this.setEntity(true);
			}
		}

		if (eVideo.getParentId() != null && eVideo.getParentId() > 0) {
			EnhancedEVideo _enhancedParentEVideo = new EnhancedEVideo();
			_enhancedParentEVideo.setId(eVideo.getParentId());
			this.enhancedParent = _enhancedParentEVideo;
		}
		if (eVideo.getSort() != null) {
			this.sort = eVideo.getSort();
		}
		this.summary = eVideo.getSummary();
		this.info = eVideo.getInfo();
		if (eVideo.getPlaytime() != null) {
			this.playtime = eVideo.getPlaytime();
		}
		if (eVideo.getStatus() != null) {
			this.status = StatusEnumForPublish.getStatusEnumByCode(eVideo
					.getStatus());
		}
		if (eVideo.getEntity() != null && eVideo.getEntity() == 1) {
			this.entity = true;
		}

		if (eVideo.getProgressStatus() != null) {
			this.setProgressStatus(ProgressStatusForSource
					.getProgressStatusEnumByCode(eVideo.getProgressStatus()));
		}
		this.tudouCode = eVideo.getTudouCode();
	}

	public EnhancedEVideo() {

	}

	private long id;
	private String title;
	private String skey;
	private String sources;
	private List<PlayTypeForEVideo> playTypes;
	private Date createTime;
	private Date updateTime;
	private String coverUrl;
	private EnhancedUser enhancedCreateUser;
	private EnhancedStatistics enhancedStatistics;// 统计数据
	private boolean entity;
	private EnhancedEVideo enhancedParent;
	private List<EnhancedEVideo> enhancedChildren;
	private EnhancedAttitude enhancedAttitude;// 用户态度
	private EnhancedRFavoriteSource enhancedRFavoriteSource;// 用户收藏对象
	private double sort;
	private String summary;
	private String info;
	private long playtime;
	private StatusEnumForPublish status;
	private ProgressStatusForSource progressStatus;
	private String tudouCode;

	/**
	 * 统计同来源相关资源
	 */
	private int countCognate;
	/**
	 * 统计同来源相关资源 播放总时间
	 */
	private long countCognatePlaytime;

	/**
	 * 拥有者
	 */
	private EnhancedUser enhancedOwner;
	/**
	 * 标签列表
	 */
	private List<EnhancedTag> enhancedTags;

	/**
	 * 所属类型分类
	 */
	private List<EnhancedDCategory> enhancedTypeDCategories;
	/**
	 * 所属地区分类
	 */
	private List<EnhancedDCategory> enhancedRegionDCategories;
	/**
	 * 所属频道分类
	 */
	private List<EnhancedDCategory> enhancedChannelDCategories;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public List<EnhancedDCategory> getEnhancedTypeDCategories() {
		return enhancedTypeDCategories;
	}

	public void setEnhancedTypeDCategories(
			List<EnhancedDCategory> enhancedTypeDCategories) {
		this.enhancedTypeDCategories = enhancedTypeDCategories;
	}

	public List<EnhancedDCategory> getEnhancedRegionDCategories() {
		return enhancedRegionDCategories;
	}

	public void setEnhancedRegionDCategories(
			List<EnhancedDCategory> enhancedRegionDCategories) {
		this.enhancedRegionDCategories = enhancedRegionDCategories;
	}

	public List<EnhancedDCategory> getEnhancedChannelDCategories() {
		return enhancedChannelDCategories;
	}

	public void setEnhancedChannelDCategories(
			List<EnhancedDCategory> enhancedChannelDCategories) {
		this.enhancedChannelDCategories = enhancedChannelDCategories;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCoverUrl() {
		return coverUrl;
	}

	public void setCoverUrl(String coverUrl) {
		this.coverUrl = coverUrl;
	}

	public EnhancedUser getEnhancedCreateUser() {
		return enhancedCreateUser;
	}

	public void setEnhancedCreateUser(EnhancedUser enhancedCreateUser) {
		this.enhancedCreateUser = enhancedCreateUser;
	}

	public List<PlayTypeForEVideo> getPlayTypes() {
		return playTypes;
	}

	public void setPlayTypes(List<PlayTypeForEVideo> playTypes) {
		this.playTypes = playTypes;
	}

	public String getSources() {
		return sources;
	}

	public void setSources(String sources) {
		this.sources = sources;
	}

	public String getSkey() {
		return skey;
	}

	public void setSkey(String skey) {
		this.skey = skey;
	}

	public EnhancedStatistics getEnhancedStatistics() {
		return enhancedStatistics;
	}

	public void setEnhancedStatistics(EnhancedStatistics enhancedStatistics) {
		this.enhancedStatistics = enhancedStatistics;
	}

	public boolean isEntity() {
		return entity;
	}

	public void setEntity(boolean entity) {
		this.entity = entity;
	}

	public EnhancedEVideo getEnhancedParent() {
		return enhancedParent;
	}

	public void setEnhancedParent(EnhancedEVideo enhancedParent) {
		this.enhancedParent = enhancedParent;
	}

	public List<EnhancedEVideo> getEnhancedChildren() {
		return enhancedChildren;
	}

	public void setEnhancedChildren(List<EnhancedEVideo> enhancedChildren) {
		this.enhancedChildren = enhancedChildren;
	}

	public double getSort() {
		return sort;
	}

	public void setSort(double sort) {
		this.sort = sort;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public int getCountCognate() {
		return countCognate;
	}

	public void setCountCognate(int countCognate) {
		this.countCognate = countCognate;
	}

	public long getCountCognatePlaytime() {
		return countCognatePlaytime;
	}

	public void setCountCognatePlaytime(long countCognatePlaytime) {
		this.countCognatePlaytime = countCognatePlaytime;
	}

	public long getPlaytime() {
		return playtime;
	}

	public void setPlaytime(long playtime) {
		this.playtime = playtime;
	}

	public EnhancedUser getEnhancedOwner() {
		return enhancedOwner;
	}

	public void setEnhancedOwner(EnhancedUser enhancedOwner) {
		this.enhancedOwner = enhancedOwner;
	}

	public EnhancedAttitude getEnhancedAttitude() {
		return enhancedAttitude;
	}

	public void setEnhancedAttitude(EnhancedAttitude enhancedAttitude) {
		this.enhancedAttitude = enhancedAttitude;
	}

	public StatusEnumForPublish getStatus() {
		return status;
	}

	public void setStatus(StatusEnumForPublish status) {
		this.status = status;
	}

	public EnhancedRFavoriteSource getEnhancedRFavoriteSource() {
		return enhancedRFavoriteSource;
	}

	public void setEnhancedRFavoriteSource(
			EnhancedRFavoriteSource enhancedRFavoriteSource) {
		this.enhancedRFavoriteSource = enhancedRFavoriteSource;
	}

	public List<EnhancedTag> getEnhancedTags() {
		return enhancedTags;
	}

	public void setEnhancedTags(List<EnhancedTag> enhancedTags) {
		this.enhancedTags = enhancedTags;
	}

	public ProgressStatusForSource getProgressStatus() {
		return progressStatus;
	}

	public void setProgressStatus(ProgressStatusForSource progressStatus) {
		this.progressStatus = progressStatus;
	}

	public String getTudouCode() {
		return tudouCode;
	}

	public void setTudouCode(String tudouCode) {
		this.tudouCode = tudouCode;
	}

}